package com.huangsm.book.designmodel.jvm;


import lombok.Getter;

/**
 * 测试JVM参数调节栈最大可用深度-Xss参数
 * @author huang
 * @date 2019/2/22
 */
public class StackErrorDemo {
    private static int count=0;

    public static void recursion(){
        count++;
        recursion();
        
    }

    public static void main(String[] args) {
        try {
            recursion();
        } catch (Throwable e) {
            System.out.println("stack 的深度"+count);
            e.printStackTrace();
        }
    }
}
